#!/usr/bin/env bash

function clean(){
  rm -rf tmp
}

clean

docker-compose -f zk1-kafka1.yaml up -d

sleep 15

echo "拷贝kafka-sh————>"
mkdir tmp
cp ../../tools/kafka-sh/* tmp

scripts_list=`ls tmp`

for script in ${scripts_list}
do
   docker cp tmp/$script kafka:/usr/local/bin/
done

echo "创建topic————>test"
docker exec kafka topic + test

clean